# -*- encoding:utf-8 -*-
'''
	movieservice.py
	======================
	@descript: 
	@copyright:chinasoft
	@author:gch
	@date: 2021-01-27 19:00
	@version:v1.0
'''
from moviedatas.items import MoviedatasItem
from entity.movieentity import MovieEntity
from dao.moviedao import Moviedao

class MovieService:
    def __init__(self):
        self.var_MovieDao=Moviedao()
        pass
    def movieSaveToDB(self,item:MoviedatasItem):
        var_movieEntity=MovieEntity(id=None,filmname=item['filmname'][0:100],var_url=item['var_url'][:],filmdate=item['filmdate'][0],major=[item['major'][0:100]])
        var_result=self.var_MovieDao.insertTable(var_movieEntity)
        return var_result
        pass
    pass